package cn.roadtrip.utilmodule.util.enumpck;

/**
 * 用户状态
 */
public enum Enum_UserInforStats {
    Open("Open", "开放"),
    Close("Close", "关闭"),
    Freze("Freze", "冻结");
    private String s;
    private String title;

    Enum_UserInforStats(String s, String title) {
        this.s = s;
        this.title = title;
    }
    Enum_UserInforStats(String s ) {
        this.s = s;
        this.title = Enum_UserInforStats.parseCode(s).getTitle();
    }

    public String getTitle() {
        return this.title;
    }

    public String getCode() {
        return this.s;
    }

    public static final Enum_UserInforStats parseCode(String code) {
        switch (code) {
            case "Open":
                return Open;
            case "Close":
                return Close;
            case "Freze":
                return Freze;
        }
        return null;
    }

    @Override
    public String toString() {
        return "(code:%s, title:%s)".formatted(this.s, this.title);
    }
}
